using UnityEngine;

public class GameProperties : MonoBehaviour
{
	private Money _wallet;

	private void Awake()
	{
		_wallet = Object.FindObjectOfType<Money>();
	}

	private void Start()
	{
		AudioListener.volume = NintendoPlayerPrefs.GetInt("Sfx", 1);
	}

	public float Money()
	{
		return NintendoPlayerPrefs.GetFloat("Money", 0f);
	}

	public void SetMoney(float delta)
	{
		NintendoPlayerPrefs.SetFloat("Money", Money() + delta);
		_wallet.UpdateValue();
	}

	public int Level()
	{
		return NintendoPlayerPrefs.GetInt("level", 0);
	}

	public void NextLevel()
	{
		NintendoPlayerPrefs.SetInt("level", Level() + 1);
	}

	public bool IsSoundEnable()
	{
		return NintendoPlayerPrefs.GetInt("Sound", 1) == 1;
	}

	public bool IsFullScreen()
	{
		return NintendoPlayerPrefs.GetInt("Fullscreen", 1) == 1;
	}

	public string GetResolution()
	{
		return "";
	}

	public void SetNextResolution()
	{

	}

	public void SetSoundEnable(bool on)
	{
		NintendoPlayerPrefs.SetInt("Sound", on ? 1 : 0);
	}

	public bool IsHapticEnable()
	{
		return NintendoPlayerPrefs.GetInt("Haptic", 1) == 1;
	}

	public void SetFullScreen(bool on)
	{
		NintendoPlayerPrefs.SetInt("Fullscreen", on ? 1 : 0);

	}

	public void SetHapticEnable(bool on)
	{
		NintendoPlayerPrefs.SetInt("Haptic", on ? 1 : 0);
	}

	public void SetSfxEnable(bool on)
	{
		int num = (on ? 1 : 0);
		NintendoPlayerPrefs.SetInt("Sfx", num);
		AudioListener.volume = num;
	}

	public bool IsSfxEnable()
	{
		return NintendoPlayerPrefs.GetInt("Sfx", 1) == 1;
	}
}
